<?php

namespace app\common\validate\Product;

//引入底层的验证器类
use think\Validate;

/**
 * 帖子验证器
 */
class ProductType extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name' => 'require',
        'weigh' => 'require|number|egt:0',  //给字段设置 >= 0
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'name.require' => '分类名称必填',
        'weigh.number'    => '分类等级必须是个数字',
    ];
    
    /**
     * 验证场景
     */
    protected $scene = [
    ];
}
